import { request } from "./request"

//微信小程序注册
export const registerUser = (data = {}) => {
    return request('get', '/wechat/registerUser', data, true);
}

//登录凭证校验
export const jscode2session = (data = {}) => {
    return request('get', '/wechat/jscode2session', data, true);
}

//微信小程序wxOpenid登录
export const openLogin = (data = {}) => {
    return request('get', '/wechat/openLogin', data, false);
}

//获取手机号
export const getWePhoneNumber = (data = {}) => {
    return request('get', '/wechat/getPhoneNumber', data, true);
}

//查看用户关注的标签并展示
export const selectUserLabel = (data = {}) => {
    return request('get', '/town/label/selectUserLabel', data, false);
}

//删除用户关注的标签
export const removeUserLabel = (data = {}) => {
    return request('delete', '/wechat/removeUserLabel?userId=' + data.userId + '&labelId=' + data.labelId, true);
}

//查看用户关注的标签并展示
export const selectRecommendLabel = (data = {}) => {
    return request('get', '/wechat/selectRecommendLabel', data, true);
}

//保存用户的关注标签
export const saveUserLabel = (data = {}) => {
    return request('get', '/wechat/saveUserLabel', data, true);
}


//查询所有标签
export const selectAllLabel = (data = {}) => {
    return request('get', '/wechat/selectAllLabel', data, true);
}
//列表数据
export const list = (data = {}) => {
    return request('get', '/wechat/selectLabelById', data, true);
}

//获取活动信息
export const focusActivities = (data = {}) => {
    return request('get', '/view/activity_information/selectActivities', data, true);
}

//获取活动详情
export const activityDetails = (data = {}) => {
    return request('get', '/view/activity_information/getActivityDetails', data, true);
}

//获取活动绑定用户动态
export const activity_BindUserDynamic = (data = {}) => {
    return request('get', '/view/activity_information/selectActivitiesDy', data, true);
}

//展示推荐用户的动态
export const selectDynamics = (data = {}) => {
    return request('get', '/town/label/selectLabelById', data, true);
}

//查询乡镇列表
export const townshipList = (data = {}) => {
    return request('get', '/townShip/selectTownShipList', data, true);
}

//获取乡镇详情
export const townShipDetails = (data = {}) => {
    return request('get', '/townShip/getTownShipDetails', data, true);
}

//根据内容搜索用户动态
export const searchList = (data = {}) => {
    return request('get', '/dynamics/selectFromTitleOrContext', data, true);
}

//查询当前活动多少人看过
export const selectBrowseNumber = (data = {}) => {
    return request('get', '/view/activity_information/selectBrowseNumber', data);
}

//查看活动是否被收藏 0是没有收藏 1已收藏
export const selectCtionActivity = (data = {}) => {
    return request('get', '/view/activity_information/SelectCollectionActivity', data);
}
//对活动进行点赞和取消
export const activityGive_option = (data = {}) => {
    return request('post', '/view/activity_information/likeActivity', data);
}

//对活动进行收藏和取消收藏
export const activityOption = (data = {}) => {
    return request('post', '/view/activity_information/collectionActivity', data);
}

//查看当前活动下的评论
export const currentComment = (data = {}) => {
    return request('get', '/view/activity_information/selectCommentByActivityId', data);
}

//对活动进行评论
export const comment = (data = {}) => {
    return request('post', '/view/activity_information/acComment', data, true);
}

//查询当前活动的评论数量
export const commentNum = (data = {}) => {
    return request('get', '/view/activity_information/selectAcCommentNumber', data);
}



//对用户动态进行点赞和取消点赞
export const dynamiGive_option = (data = {}) => {
    return request('post', '/dynamics/likeDynamics', data, false);
}

//对用户动态进行收藏和取消收藏
export const dynamiCollection_option = (data = {}) => {
    return request('post', '/dynamics/collectionDynamics', data);
}

//用户动态详情
export const dynamicsDetails = (data = {}) => {
    return request('get', '/dynamics/getDynamicsDetails', data, true);
}

//根据用户动态获取景区列表
export const getDyLandscapes = (data = {}) => {
    return request('get', '/dynamics/getDyLandscapes', data);
}

//查询当前动态的评论数量
export const dynamiCommentNum = (data = {}) => {
    return request('get', '/dynamics/acCommentNumber', data);
}

//对动态进行评论
export const dynamiCommentOption = (data = {}) => {
    return request('post', '/dynamics/dyComment', data, true);
}

//查看当前动态下的评论
export const dynamiComment = (data = {}) => {
    return request('get', '/dynamics/selectCommentByDynamicsId', data);
}

//根据乡镇名，查询乡镇
export const selectTownShip = (data = {}) => {
    return request('get', '/townShip/selectTownShip', data, false);
}

//根据传进来的乡镇进行范围搜索
export const townRange_list = (data = {}) => {
    return request('get', '/townShip/selectDynamics', data, false);
}

//根据乡镇查询景区
export const selectScenicSpot = (data = {}) => {
    return request('get', '/townShip/selectScenicSpot', data, false);
}

//根据乡镇名查询饭店
export const selectHotel = (data = {}) => {
    return request('get', '/townShip/selectHotel', data);
}

//根据乡镇名查询场所
export const selectPlace = (data = {}) => {
    return request('get', '/townShip/selectVenueByTownShipId', data);
}

//查看当前乡镇下的评论
export const selectCommentBytown = (data = {}) => {
    return request('get', '/townShip/selectCommentBytownShipId', data);
}

//查看当前乡镇下的评论数量
export const selectCommenTownNum = (data = {}) => {
    return request('get', '/townShip/selectCommentNumberById', data);
}

//对乡镇进行评论
export const tsComment = (data = {}) => {
    return request('post', '/townShip/tsComment?userId=' + data.userId + '&townShipId=' + data.townShipId + '&content=' + data.content);
}

//根据乡镇名，查询此乡镇发布的动态
export const townNameDynamic = (data = {}) => {
    return request('get', '/townShip/selectDynamics', data);
}

//根据乡镇名，查询此乡镇活动列表
export const townActivity_list = (data = {}) => {
    return request('get', '/townShip/selectTownShipActivity', data, false);
}

//根据景区名称，查询此景区发布的动态
export const scenicspotDynamices = (data = {}) => {
    return request('get', '/townShip/selectScenicSpotDynamices', data);
}

//根据景点id查询景点下的用户动态
export const selectScenicSpotDynamices = (data = {}) => {
    return request('get', '/townShip/selectScenicSpotDynamices', data);
}

//获取活动绑定的商品
export const activitiesShoping_list = (data = {}) => {
    return request('get', '/view/activity_information/selectActivitiesCommodity', data);
}

//获取活动绑定的场所
export const activitiesPlace_list = (data = {}) => {
    return request('get', '/view/activity_information/selectActivitiesVe', data);
}

//获取活动绑定的景区
export const activitiesScspot_list = (data = {}) => {
    return request('get', '/view/activity_information/selectActivitiesLs', data);
}

//活动报名
export const ActivityRegistration = (data = {}) => {
    return request('post', '/view/activity_information/activityRegistration', data, true);
}
//取消活动报名
export const ActivityRegistration_quxiao = (data = {}) => {
    return request('get', '/view/activity_information/cancelactivityRegistration', data, true);
}
//首次登录查看所有标签
export const label_All = (data = {}) => {
    return request('get', '/town/label/getAllLabel', data, true);
}

//保存用户关注的标签
export const label_Server = (data = {}) => {
    return request('post', '/town/label/saveUserLabel', data, true);
}

//获取引导页数据
export const BootPage = (data = {}) => {
    return request('get', '/town/guide/info', data, true);
}

//获取标签分类
export const label_type = (data = {}) => {
    return request('get', '/town/label/getLabelClassify', data, false);
}

//查询全部的标签
export const labelAll = (data = {}) => {
    return request('get', '/town/label/getLabel', data, false);
}

//保存用户关注标签 
export const preservationUser_label = (data = {}) => {
    return request('post', '/town/label/saveUserLabel', data, false);
}

//获取乡镇 
export const townName_obtain = (data = {}) => {
    return request('get', '/my/MyTownShipName', data, false);
}


//地区数据  获取省份数据
export const province_Data = (data = {}) => {
    return request('get', '/town/mgy/getProvince', data, true);
}

//地区数据  获取市级数据
export const municipalLevel_Data = (data = {}) => {
    return request('get', '/town/mgy/getCity', data, false);
}

//地区数据  获取县级数据
export const county_Data = (data = {}) => {
    return request('get', '/town/mgy/getCounty', data, false);
}

//地区数据  获取乡镇数据
export const township_Data = (data = {}) => {
    return request('get', '/town/mgy/getTownship', data, false);
}

//查询商家下的卡券
export const venueCode = (data = {}) => {
    return request('get', '/town/venue/getVenueCode', data, false);
}

//相关景区和推荐活动详情接口
export const suggestInfo = (data = {}) => {
    return request('get', '/view/activity_information/suggestInfo', data, true);
}

//获取轮播图
export const listSwiper = (data = {}) => {
    return request('get', '/view/activity_information/getRotationChart', data, true);
}

//热门目的地列表
export const listPopularDetions = (data = {}) => {
    return request('get', '/view/activity_information/getDestination', data, true);
}

//获取乡村列表
export const listVillage = (data = {}) => {
    return request('get', '/view/activity_information/getMoreDestination', data, true);
}

//根据乡镇查询热门景点
export const listHotSpots_townShip = (data = {}) => {
    return request('get', '/townShip/getHotSpots', data, true);
}

//根据乡镇查询热门景点更多
export const listHotSpotsMore_townShip = (data = {}) => {
    return request('get', '/townShip/getMoreHotSpots', data, true);
}

//根据乡镇查询旅游乡村
export const listTourismVillage_townShip = (data = {}) => {
    return request('get', '/townShip/getVillage', data, true);
}

//根据乡镇查询乡村特产
export const villageGoodsList_townShip = (data = {}) => {
    return request('get', '/townShip/getVillageGoods', data, true);
}

//根据景区查询附近景点
export const vicinityHotSpots = (data = {}) => {
    return request('get', '/townShip/getVicinityHotSpots', data, true);
}

//查询场所详情
export const infoPlace = (data = {}) => {
    return request('get', '/view/activity_information/getVenueDetail', data, true);
}

//查询乡村详情
export const infoVillage = (data = {}) => {
    return request('get', '/townShip/getVillageDetail', data, true);
}

//根据乡村查询乡村景点
export const listRuralAttractions = (data = {}) => {
    return request('get', '/townShip/getVillageSpots', data, true);
}

//根据乡村查询乡村相关动态
export const listVillageDynamics = (data = {}) => {
  return request('get', '/townShip/getVillageDynamics', data, true);
}

//全局搜索接口
export const listSeachAll = (data = {}) => {
    return request('get', '/view/activity_information/getSearchMsg', data, true);
  }


